package jp.cane.delicious.recipe07;

import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;

public class Button1ClickListener implements OnClickListener {
	private Context context;

	Button1ClickListener(Context context) {
		this.context = context;
	}

	public void onClick(View v) {
		Activity activity = (Activity) this.context;
		EditText edittext = (EditText) activity.findViewById(R.id.editText1);
		String text = edittext.getText().toString();

		Intent intent = new Intent(this.context, SecondActivity.class);
		intent.putExtra(Intent.EXTRA_TEXT, text);
		this.context.startActivity(intent);
	}
}
